package bongo.framework.gameobject.component.impl;

import bongo.framework.gameobject.GameObject;
import bongo.framework.gameobject.component.AbstractComponent;
import bongo.framework.gameobject.component.Component;
/**
 * The TransformComponent is a Component used for storing position, scale and rotation information of a {@link GameObject}
 * 
 * @author boogie
 *
 */
public class TransformComponent extends AbstractComponent {

	private float x, y;
	private float rotation;

	private float scaleX, scaleY;

	public float x() {
		return x;
	}

	public void setX(float x) {
		this.x = x;
	}

	public float y() {
		return y;
	}

	public void setY(float y) {
		this.y = y;
	}

	public void setTranslation(float x,float y){
		this.x = x;
		this.y = y;
	}
	
	public float rotation() {
		return rotation;
	}

	public void setRotation(float rotation) {
		this.rotation = rotation;
	}

	public float scaleX() {
		return scaleX;
	}

	public void setScaleX(float scaleX) {
		this.scaleX = scaleX;
	}

	public float scaleY() {
		return scaleY;
	}

	public void setScaleY(float scaleY) {
		this.scaleY = scaleY;
	}
	
	public void setScale(float scaleX,float scaleY){
		this.scaleX = scaleX;
		this.scaleY = scaleY;
	}

	@Override
	public Component cloneForGameObject(GameObject g) {
		return new TransformComponent();
	}

}
